package net.seehope.foodie.service.impl;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.ServletRequestBindingException;
import org.springframework.web.bind.ServletRequestUtils;
import org.springframework.web.context.request.ServletWebRequest;

import net.seehope.foodie.code.SmsCodeSender;
import net.seehope.foodie.code.ValidateCode;

@Component
public class SmsCodeSenderImpl implements SmsCodeSender{

	
	private static final Logger log = LoggerFactory.getLogger(SmsCodeSenderImpl.class);

	@Override
	public String send(ServletWebRequest request, ValidateCode validateCode) throws ServletRequestBindingException   {
		//通过request得到手机号
		log.info("已经向手机号{}发送验证码{}",ServletRequestUtils.getStringParameter(request.getRequest(),"mobile"),
				validateCode.getCode());
		
		return null;
	}

	

}
